const users = [
  { id: 0, name: 'Umi', nickName: 'U', gender: 'MALE' },
  { id: 1, name: 'Fish', nickName: 'B', gender: 'FEMALE' },
];

export default {
  '/tc_api/getMenuList': [
    {
      "title": "权限中心",
      "key": "1",
      "children": [
        {
          "title": "账号管理",
          "key": "2"
        },

        {
          "title": "岗位管理",
          "key": "3"
        },
        {
          "title": "角色管理",
          "key": "4"
        },
        {
          "title": "人员授权",
          "key": "5"
        },
        {
          "title": "菜单管理",
          "key": "6"
        },


      ]
    },
    {
      "title": "MES系统",
      "key": "7",
      "children": [
        {
          "title": "首页",
          "key": "8",
        }, {
          "title": "基础配置",
          "key": "9",
          "children": [
            {
              "title": "车间管理",
              "key": "10"
            },
            {
              "title": "产线管理",
              "key": "11"
            },
            {
              "title": "班组管理",
              "key": "12"
            }
          ]
        },

      ]
    },
    {
      "title": "登录页",
      "key": "88"
    },
    {
      "title": "主页",
      "key": "89"
    },
  ],
  '/api/getMenuDetails': (req: any, res: any) => {
    if (req.query.key === "2") {
      res.send({ key: '2', parent: '1', type: 1, encode: "Auth_menu_plus_edit", name: "账号管理", icon: "CaretLeftOutlined", link: "thinkcar.com", path: "/auth/menu", sort: 1, description: "测试" });
    } else {
      res.send({ key: req.query.key, parent: 'xxx', type: 2, encode: "Auth_menu_edit", name: "测试", icon: "CaretLeftOutlined", link: "thinkcar.com", path: "/auth/role", sort: 1, description: "测试" });

    }
  },
  '/api/getEmpowerItem': {
    success: true,
    appMesg: "操作成功",
    result: [
      {
        "title": "权限中心",
        "id": "1",
        "permission": true,
        "children": [
          {
            "title": "账号管理",
            "id": "2",
            "permission": true,
            "list": [{
              "title": "按钮1",
              "id": "888",
              "permission": true,
            }, {
              "title": "按钮2",
              "id": "889",
              "permission": false,
            }]
          },
        ]
      },
      {
        "title": "MES系统",
        "id": "7",
        "permission": false,
        "children": [
          {
            "title": "首页",
            "id": "8",
            "permission": true,
            "list": [{ "title": "按钮8", "id": "1001", "permission": false, }, { "title": "按钮9", "id": "10010", "permission": true, }, { "title": "按钮810", "id": "10011", "permission": true, }]
          },
          {
            "title": "基础配置",
            "id": "9",
            "permission": false,
            "type": 1,
            "children": [
              {
                "title": "车间管理",
                "id": "10",
                "permission": true,

                "list": [{
                  "title": "按钮3",
                  "id": "900",
                  "permission": true,

                }, {
                  "title": "按钮4",
                  "id": "901",
                  "permission": false,

                }]
              },
              {
                "title": "产线管理",
                "id": "11",
                "permission": false,

                "list": [{
                  "title": "按钮1",
                  "id": "902",
                  "permission": true,

                }, {
                  "title": "按钮2",
                  "id": "903",
                  "permission": false,

                }]
              },
            ]
          },

        ]
      }
    ]
  },
  'GET /api/v1/queryUserList': (req: any, res: any) => {
    res.json({
      success: true,
      data: { list: users },
      errorCode: 0,
    });
  },
  'PUT /api/v1/user/': (req: any, res: any) => {
    res.json({
      success: true,
      errorCode: 0,
    });
  },
};
